package com.example.springbootvalidation.vo;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


@Data
public class TestVo {
    @NotBlank(message = "姓名不能为空")
    private String name;

    @NotNull(message = "年龄必填")
    @Max(value = 20,message = "年龄必须小于20")
    @Min(value = 0,message = "年龄必须大于0")
    private Integer age;
}
